<template>
    <el-dialog :close-on-click-modal="false"  ref="dialogform" :title="title" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
        <el-descriptions class="margin-top" direction="vertical" :column="3" border>
            <el-descriptions-item>
                <template slot="label">批次名称</template>
                xxxxx批次
            </el-descriptions-item>
            <el-descriptions-item>
                <template slot="label">批次号</template>
                205665465110
            </el-descriptions-item>
            <el-descriptions-item>
                <template slot="label">养殖设施</template>
                19#鱼塘
            </el-descriptions-item>
            <el-descriptions-item>
                <template slot="label">养殖类别</template>
                鱼
            </el-descriptions-item>
            <el-descriptions-item>
                <template slot="label">品种</template>
                皖鱼
            </el-descriptions-item>
            <el-descriptions-item>
                <template slot="label">养殖占比</template>
                30%
            </el-descriptions-item>
            <el-descriptions-item>
                <template slot="label">养殖粒数</template>
                100000粒
            </el-descriptions-item>
            <el-descriptions-item>
                <template slot="label">养殖重量</template>
                100000斤
            </el-descriptions-item>
            <el-descriptions-item>
                <template slot="label">养殖开始日期</template>
                2023-1-13
            </el-descriptions-item>
        </el-descriptions>
        <span slot="footer" class="dialog-footer">
            <el-button @click="cancel">关 闭</el-button>
        </span>
    </el-dialog>
</template>
<script>
export default {
    components: {},
    props: {
        addEditFlag: {
            type: String,
            default: () => {
                return 'add'
            }
        },
        data: {
            type: Array,
            default: () => {
                return [{
                    item1: 'batch_20230101',
                    item2: 'batchNo_01',
                    item3: '鱼',
                    item4: '皖鱼',
                    item5: '10000',
                    item6: '10000',
                    item7: '是'
                }, {
                    item1: 'batch_20230102',
                    item2: 'batchNo_02',
                    item3: '鱼',
                    item4: '草鱼',
                    item5: '10000',
                    item6: '10000',
                    item7: '是'
                }]
            }
        },
        title: {
            type: String,
            default: () => {
                return '操作表单'
            }
        },
        dialogVisible: {
            type: Boolean,
            default: () => {
                return false
            }
        }
    },
    data() {
        return {
            addEditApi: '',
            ruleForm: {},
            rules: {
                item1: [
                    { required: true, message: '请输入批次名称', trigger: 'change' }
                ],
                item2: [
                    { required: true, message: '请选择养殖设施', trigger: 'change' }
                ]
            }
        }
    },
    computed: {

    },
    watch: {},
    
    mounted() { },
    methods: {
        //取消关闭
        cancel() {
            this.$emit("closeDialog")
        },
        handleClose(done) {
            this.$confirm('确认关闭？')
                .then(_ => { this.cancel() })
                .catch(_ => { });
        }
    }
};
</script>
<style lang="scss" scoped>
.btn {
    padding: 0 5px;
}
</style>
  
  